## set path to replication folder
curcomp <- c("~/Dropbox/Research/Carbon Pricing Conjoint/cp_conjoint_rep/")
setwd(curcomp)

## do not print warnings [(particularly NAs introduced by coercion in as.numeric()...)]
options(warn=-1) # set to options(warn=0) to restore warnings

## Load packages via groundhog
date <- "2024-04-01"
library(groundhog)
suppressMessages(groundhog.library(c("readxl","scales","countrycode","tidygeocoder","sf",
                                     "ggtext","shadowtext","maps","ggalt","ggthemes",
                                     "weights","anesrake","cjoint","xtable","glue","tidyverse"),date = date))

## Load helper functions
source("cp_conjoint_helper_functions.R")

## script replicating descriptive figures
source("cp_conjoint_descriptives.R")

rm(list = ls())

## Load helper functions
source("cp_conjoint_helper_functions.R")

## script replicating analysis results in main text and supplementary materials
source("cp_conjoint_analysis.R")
